<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>for</title>
</head>
<body>
<table>
 <thead>
 <tr>
     <th>序号</th>
     <th>名称</th>
     <th>作者</th>
 </tr>
 </thead>
    <tbody>
     {% for book in books %}
         <tr>
           <td>{{ forloop.counter }}</td>
           <td>{{ book.name }}</td>
           <td>{{ book.author }}</td>
         </tr>
    {% endfor %}
    </tbody>
</table>

<div>
    {% for key,value in person.items %}
      <p>{{ key }}:{{ value }}</p>
    {% endfor %}
</div>

</body>
</html>